﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PPARAttachmentTab.aspx.cs"
    Inherits="PPAP.Web.Part.PPARAttachmentTab" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <style type="text/css">
        .button1
        {
            background: transparent url(../images/newimg/esc_bg.png) no-repeat scroll 0 0;
            width: 102px;
            height: 23px;
            border: none;
            color: White;
            font-weight: bold;
            cursor: pointer;
            margin: 0 0 0 0;
        }
    </style>
    <script language="javascript">
        function del(id) {
            if (id > 0) {
                if (confirm('Please confirm to delete the file.')) {
                    url = "PPARAttachmentTab.aspx?deid=" + id;
                    window.location.href = url;
                }
            }
        }
    </script>
</head>
<body style="font-family: Arial, Helvetica, sans-serif; overflow-x: hidden;">
    <form id="form1" runat="server">
    <div>
        <table width="100%">
            <tr>
                <td style="font-weight: bold; color: #2E8AC5;">
                    Submission level
                </td>
                <td>
                    <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
                        <asp:ListItem Value="1">Level 1</asp:ListItem>
                        <asp:ListItem Value="2">Level 2</asp:ListItem>
                        <asp:ListItem Value="3" Selected="True">Level 3</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td>
                    <asp:Label ID="lblApp" runat="server" Text="Inapplicable"></asp:Label>
                </td>
                <td style="font-weight: bold; color: #2E8AC5;">
                    Template
                </td>
                <td>
                    <font color='blue'>
                        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/DownLoad/download.zip.zip"><font color='blue'>Download(zip)</font></asp:HyperLink>
                    </font>
                </td>
            </tr>
        </table>
        <table width="100%">
            <tr style="color: #000000; background-color: #E7E8E8; font-weight: bold; font-size: 25px;
                height: 28px;">
                <td style="width: 4%;">
                </td>
                <td style="width: 4%;">
                    No.
                </td>
                <td style="width: 25%;">
                    Attach.type
                </td>
                <td style="width: 4%;">
                </td>
                <td style="width: 4%;">
                    No.
                </td>
                <td style="width: 25%;">
                    Attach.type
                </td>
                <td style="width: 4%;">
                </td>
                <td style="width: 4%;">
                    No.
                </td>
                <td style="width: 25%;">
                    Attach.type
                </td>
            </tr>
            <tr style="height: 36px;">
                <td>
                    <asp:Image ID="img1" runat="server" ImageUrl="~/Part/image/1.png" />
                </td>
                <td align="center">
                    1
                </td>
                <td>
                    <asp:Label ID="lblType1" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                    <asp:Image ID="img11" runat="server" ImageUrl="~/Part/image/1.png" />
                </td>
                <td align="center">
                    11
                </td>
                <td>
                    <asp:Label ID="lblType11" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                    <asp:Image ID="img21" runat="server" ImageUrl="~/Part/image/1.png" />
                </td>
                <td align="center">
                    21
                </td>
                <td>
                    <asp:Label ID="lblType21" runat="server" Text="Label"></asp:Label>
                </td>
            </tr>
            <tr style="background: #F2F2F2; height: 36px;">
                <td>
                    <asp:Image ID="img2" runat="server" ImageUrl="~/Part/image/1.png" />
                </td>
                <td align="center">
                    2
                </td>
                <td>
                    <asp:Label ID="lblType2" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                    <asp:Image ID="img12" runat="server" ImageUrl="~/Part/image/1.png" />
                </td>
                <td align="center">
                    12
                </td>
                <td>
                    <asp:Label ID="lblType12" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                    <asp:Image ID="img22" runat="server" ImageUrl="~/Part/image/1.png" />
                </td>
                <td align="center">
                    22
                </td>
                <td>
                    <asp:Label ID="lblType22" runat="server" Text="Label"></asp:Label>
                </td>
            </tr>
            <tr style="height: 36px;">
                <td>
                    <asp:Image ID="img3" runat="server" ImageUrl="~/Part/image/1.png" />
                </td>
                <td align="center">
                    3
                </td>
                <td>
                    <asp:Label ID="lblType3" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                    <asp:Image ID="img13" runat="server" ImageUrl="~/Part/image/1.png" />
                </td>
                <td align="center">
                    13
                </td>
                <td>
                    <asp:Label ID="lblType13" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                    <asp:Image ID="img23" runat="server" ImageUrl="~/Part/image/1.png" />
                </td>
                <td align="center">
                    23
                </td>
                <td>
                    <asp:Label ID="lblType23" runat="server" Text="Label"></asp:Label>
                </td>
            </tr>
            <tr style="background: #F2F2F2; height: 36px;">
                <td>
                    <asp:Image ID="img4" runat="server" ImageUrl="~/Part/image/1.png" />
                </td>
                <td align="center">
                    4
                </td>
                <td>
                    <asp:Label ID="lblType4" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                    <asp:Image ID="img14" runat="server" ImageUrl="~/Part/image/1.png" />
                </td>
                <td align="center">
                    14
                </td>
                <td>
                    <asp:Label ID="lblType14" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                    <asp:Image ID="img24" runat="server" ImageUrl="~/Part/image/1.png" />
                </td>
                <td align="center">
                    24
                </td>
                <td>
                    <asp:Label ID="lblType24" runat="server" Text="Label"></asp:Label>
                </td>
            </tr>
            <tr style="height: 36px;">
                <td>
                    <asp:Image ID="img5" runat="server" ImageUrl="~/Part/image/1.png" />
                </td>
                <td align="center">
                    5
                </td>
                <td>
                    <asp:Label ID="lblType5" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                    <asp:Image ID="img15" runat="server" ImageUrl="~/Part/image/1.png" />
                </td>
                <td align="center">
                    15
                </td>
                <td>
                    <asp:Label ID="lblType15" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                    <asp:Image ID="img25" runat="server" ImageUrl="~/Part/image/1.png" />
                </td>
                <td align="center">
                    25
                </td>
                <td>
                    <asp:Label ID="lblType25" runat="server" Text="Label"></asp:Label>
                </td>
            </tr>
            <tr style="background: #F2F2F2; height: 36px;">
                <td>
                    <asp:Image ID="img6" runat="server" ImageUrl="~/Part/image/1.png" />
                </td>
                <td align="center">
                    6
                </td>
                <td>
                    <asp:Label ID="lblType6" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                    <asp:Image ID="img16" runat="server" ImageUrl="~/Part/image/1.png" />
                </td>
                <td align="center">
                    16
                </td>
                <td>
                    <asp:Label ID="lblType16" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                    <asp:Image ID="img26" runat="server" ImageUrl="~/Part/image/1.png" />
                </td>
                <td align="center">
                    26
                </td>
                <td>
                    <asp:Label ID="lblType26" runat="server" Text="Label"></asp:Label>
                </td>
            </tr>
            <tr style="height: 36px;">
                <td>
                    <asp:Image ID="img7" runat="server" ImageUrl="~/Part/image/1.png" />
                </td>
                <td align="center">
                    7
                </td>
                <td>
                    <asp:Label ID="lblType7" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                    <asp:Image ID="img17" runat="server" ImageUrl="~/Part/image/1.png" />
                </td>
                <td align="center">
                    17
                </td>
                <td>
                    <asp:Label ID="lblType17" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                    <asp:Image ID="img27" runat="server" ImageUrl="~/Part/image/1.png" />
                </td>
                <td align="center">
                    27
                </td>
                <td>
                    <asp:Label ID="lblType27" runat="server" Text="Label"></asp:Label>
                </td>
            </tr>
            <tr style="background: #F2F2F2; height: 36px;">
                <td>
                    <asp:Image ID="img8" runat="server" ImageUrl="~/Part/image/1.png" />
                </td>
                <td align="center">
                    8
                </td>
                <td>
                    <asp:Label ID="lblType8" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                    <asp:Image ID="img18" runat="server" ImageUrl="~/Part/image/1.png" />
                </td>
                <td align="center">
                    18
                </td>
                <td>
                    <asp:Label ID="lblType18" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                    <asp:Image ID="img28" runat="server" ImageUrl="~/Part/image/1.png" />
                </td>
                <td align="center">
                    28
                </td>
                <td>
                    <asp:Label ID="lblType28" runat="server" Text="Label"></asp:Label>
                </td>
            </tr>
            <tr style="height: 36px;">
                <td>
                    <asp:Image ID="img9" runat="server" ImageUrl="~/Part/image/1.png" />
                </td>
                <td align="center">
                    9
                </td>
                <td>
                    <asp:Label ID="lblType9" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                    <asp:Image ID="img19" runat="server" ImageUrl="~/Part/image/1.png" />
                </td>
                <td align="center">
                    19
                </td>
                <td>
                    <asp:Label ID="lblType19" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                    &nbsp;</td>
                <td align="center">
                    &nbsp;</td>
                <td>
                    <asp:Label ID="lblType29" runat="server" Text="Label" Visible="False"></asp:Label>
                </td>
            </tr>
            <tr style="background: #F2F2F2; height: 36px;">
                <td>
                    <asp:Image ID="img10" runat="server" ImageUrl="~/Part/image/1.png" />
                </td>
                <td align="center">
                    10
                </td>
                <td>
                    <asp:Label ID="lblType10" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                    <asp:Image ID="img20" runat="server" ImageUrl="~/Part/image/1.png" />
                </td>
                <td align="center">
                    20
                </td>
                <td>
                    <asp:Label ID="lblType20" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                    &nbsp;</td>
                <td align="center">
                    &nbsp;</td>
                <td>
                    <asp:Label ID="lblType30" runat="server" Text="Label" Visible="False"></asp:Label>
                </td>
            </tr>
        </table>
        <table width="100%">
            <tr>
                <td colspan="2" style="height: 32px;">
                    Are non-conformities relative to customer specifications present ?&nbsp;&nbsp;
                    <asp:RadioButton ID="rbtYes" runat="server" GroupName="a" Text="Yes" />
                    &nbsp;
                    <asp:RadioButton ID="rbtNo" runat="server" GroupName="a" Text="No" />
                </td>
            </tr>
            <tr>
                <td style="font-weight: bold; color: #2E8AC5;">
                    Uploaded by supplier
                </td>
                <td align="right" runat="server" id="td1">
                    <input type="button" class="button" onclick="javascript:PopUpWindow('UploadFile.aspx?RID=<%=RID %>&FJID=<%=FJRID %>&filetype=Attachment', 230, 160, 730, 420);"
                        value="Add" />
                </td>
            </tr>
            <tr style="display: none;">
                <td colspan="2">
                    <asp:DropDownList ID="ddlType" runat="server">
                    </asp:DropDownList>
                    &nbsp;
                    <asp:FileUpload ID="file" runat="server" />
                    &nbsp;
                    <asp:Button ID="btnUpload" runat="server" Text="Upload" OnClick="btnUpload_Click" />
                </td>
            </tr>
        </table>
        <asp:GridView ID="GridView1" runat="server" CellPadding="4" Width="100%" GridLines="None" 
            AutoGenerateColumns="False">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:TemplateField HeaderText="No." HeaderStyle-Font-Size="12px" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("rownum") %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Attach.type" HeaderStyle-Font-Size="12px"  ItemStyle-HorizontalAlign="Center" ItemStyle-Width="20%">
                    <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%# Eval("ATTACHMENTTYPE") %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="File name" HeaderStyle-Font-Size="12px"  ItemStyle-HorizontalAlign="Center" ItemStyle-Width="30%">
                    <ItemTemplate>
                        <a href='<%# GetLink(Eval("F_URL").ToString()) %>' style="display: none;" target="_blank">
                            <span style="color: Blue;">
                                <%# Eval("F_Filename")%></span> </a>
                        <asp:LinkButton ID="LinkButton2" Visible="true" Text='<%# Eval("F_URL") %>' runat="server"
                            OnClick="LinkButton2_Click"><%# Eval("F_Filename")%></asp:LinkButton>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Size" HeaderStyle-Font-Size="12px"  ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%">
                    <ItemTemplate>
                        <asp:Label ID="Label7" runat="server" Text='<%# Eval("filesize") %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Create date" HeaderStyle-Font-Size="12px"  ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%">
                    <ItemTemplate>
                        <asp:Label ID="Label5" runat="server" Text='<%#Eval("UpTime").ToString()==""?"":DateTime.Parse(Eval("UpTime").ToString()).ToString("yyyy-MM-dd")  %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Create by" HeaderStyle-Font-Size="12px"  ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%">
                    <ItemTemplate>
                        <asp:Label ID="Label4" runat="server" Text='<%# Eval("UpBy") %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Delete" HeaderStyle-Font-Size="12px"  ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%">
                    <ItemTemplate>
                        <asp:LinkButton ID="LinkButton1" Visible='<%#Eval("F_ID").ToString()==""?false:false %>'
                            runat="server" OnClientClick="return confirm('Please confirm to delete the file.')"
                            PostBackUrl='<%# "PPARAttachmentTab.aspx?deid="+Eval("F_ID") %>'>Delete</asp:LinkButton>
                        <img src="../Images/newimg/delete.png" title="Delete" onclick="<%#"javascript:del("+Eval("F_ID")+")" %>" />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:TemplateField>
            </Columns>
            <EditRowStyle BackColor="#2E8AC5" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#E7E8E8" Font-Bold="True" ForeColor="#000000" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
        <table width="100%" runat="server" id="ta1">
            <tr>
                <td style="font-weight: bold; color: #2E8AC5;">
                    Uploaded by BDNT
                </td>
                <td align="right" runat="server" id="td2">
                    <input type="button" class="button" onclick="javascript:PopUpWindow('UploadFile.aspx?RID=<%=RID %>&FJID=<%=QEFJID %>&filetype=Attachment', 230, 160, 730, 420);"
                        value="Add" />
                </td>
            </tr>
            <tr style="display: none;">
                <td colspan="2">
                    <asp:DropDownList ID="DropDownList2" runat="server">
                    </asp:DropDownList>
                    &nbsp;
                    <asp:FileUpload ID="FileUpload1" runat="server" />
                    &nbsp;
                    <asp:Button ID="Button1" runat="server" Text="Upload" OnClick="btnUpload_Click" />
                </td>
            </tr>
        </table>
        <asp:GridView ID="GridView2" runat="server" CellPadding="4" Width="100%" ForeColor="#333333"
            GridLines="None" AutoGenerateColumns="False">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:TemplateField HeaderText="No." HeaderStyle-Font-Size="12px"  ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("rownum") %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Attach.type" HeaderStyle-Font-Size="12px"  ItemStyle-HorizontalAlign="Center" ItemStyle-Width="20%">
                    <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%# Eval("ATTACHMENTTYPE") %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="File name" HeaderStyle-Font-Size="12px"  ItemStyle-HorizontalAlign="Center" ItemStyle-Width="30%">
                    <ItemTemplate>
                        <a href='<%# GetLink(Eval("F_URL").ToString()) %>' style="display: none;" target="_blank">
                            <span style="color: Blue;">
                                <%# Eval("F_Filename")%></span> </a>
                        <asp:LinkButton ID="LinkButton3" Text='<%# Eval("F_URL") %>' Visible="true" runat="server"
                            OnClick="LinkButton2_Click"><%# Eval("F_Filename")%></asp:LinkButton>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Size" HeaderStyle-Font-Size="12px"  ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%">
                    <ItemTemplate>
                        <asp:Label ID="Label7" runat="server" Text='<%# Eval("filesize") %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Create date" HeaderStyle-Font-Size="12px"  ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%">
                    <ItemTemplate>
                        <asp:Label ID="Label5" runat="server" Text='<%#Eval("UpTime").ToString()==""?"":DateTime.Parse(Eval("UpTime").ToString()).ToString("yyyy-MM-dd")  %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Create by" HeaderStyle-Font-Size="12px"  ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%">
                    <ItemTemplate>
                        <asp:Label ID="Label4" runat="server" Text='<%# Eval("UpBy") %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Delete" HeaderStyle-Font-Size="12px"  ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%">
                    <ItemTemplate>
                        <asp:LinkButton ID="LinkButton1" Visible='<%#Eval("F_ID").ToString()==""?false:false %>'
                            runat="server" OnClientClick="return confirm('Please confirm to delete the file.')"
                            PostBackUrl='<%# "PPARAttachmentTab.aspx?deid="+Eval("F_ID") %>'>Delete</asp:LinkButton>
                        <img src="../Images/newimg/delete.png" title="Delete" onclick="<%#"javascript:del("+Eval("F_ID")+")" %>" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EditRowStyle BackColor="#2E8AC5" />
            <FooterStyle BackColor="#507CD1" ForeColor="White" />
            <HeaderStyle BackColor="#E7E8E8" ForeColor="#000000" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
        <hr />
        <table width="100%">
            <tr>
                <td align="center">
                    <asp:Button ID="btnSubmit" runat="server" CssClass="button" OnClick="btnSubmit_Click"
                        OnClientClick="return confirm('Are you sure you want to submit?');" Text="Submit" />
                    <br />
                    <br />
                    <asp:Label ID="lblErrMessage" runat="server" ForeColor="Red"></asp:Label>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
